def ling_export_store(page):
    """直接操作页面对象"""
    try:
        # 确保在正确的线程上下文中
        if not page.context._browser._is_connected():
            raise RuntimeError("页面连接已断开")
            
        page.bring_to_front()
        page.click("#export_button")
        # ... 具体操作逻辑 ...
        return download_path
    except Exception as e:
        raise RuntimeError(f"库存导出失败: {str(e)}") 